package com.trainsmart.smartmvc.conf
{
	public class Action
	{
		/*
		<action id="cancel" control="cancel"/>	
		or 
		<action id="back" flow="personInfo"/>
		*/
		
		private var option:int = 2;
		
		public var id:String = "";
		public var name:String = "";
		
		//option 1 : triger a control
		private var _control:String = null;
		
		// option 2 trigger a flow
		public var step:String = null;		
		
		public static var OPTION_OPEN_STEP:int = 2;
		public static var OPTION_EXECUTE_CONTROL:int = 1;
		
		public function Action()
		{
		}
		
		public function getOption():int
		{
			return option;
		}
		
		public function set control(value:String):void
		{
			if(value!=""){
				option = 1;
				_control = value;
			}else{
				option = 2;
			}
		}
		public function get control():String
		{
			return _control;
		}

	}
}